{% extends "base.html" %}

{% block title %}{{ list_title }} to-do items{% endblock %}

{% block content %}

{# Only admins can delete lists. #}
{% ifequal can_del 1 %}


    {% if list_killed %}

       <p> {{ list.name }} is gone.</p>
   
        <a href="{% url todo-lists %}">Return to lists</a>   

    {% else %}

        <h1>Delete entire list: {{ list.name }} ?</h1>

        <p>Category tally:</p>

         <ul>   
            <li>Incomplete: {{ item_count_undone }} </li>
            <li>Complete: {{ item_count_done }} </li>
            <li><strong>Total: {{ item_count_total }}</strong> </li>
         </ul>   
 
        <p> ... all of which will be irretrievably <strong>blown away</strong>. Are you sure you want to do that?</p>

        <form action="" method="post" accept-charset="utf-8">
 
            <input type="hidden" name="list" value="{{ list.id }}" id="some_name">
         <p><input type="submit" name="delete-confirm" value="Do it! &rarr;" class="todo-button"> </p>
        </form>


        <a href="{% url todo-incomplete_tasks list.id list_slug %}">Return to list: {{ list.name }}</a>

    {% endif %}


{% else %}

    <p>Sorry, you don't have permission to delete lists. Please contact your group administrator.</p>

{% endifequal %}




   
   
	
{% endblock %}